package com.cntcdt.api.service.impl;

import java.util.List;

import com.cntcdt.api.db.dao.GroupDemoDeviceDao;
import com.cntcdt.api.db.model.GroupDemoDeviceModel;
import com.cntcdt.api.service.GroupDemoDeviceService;

public class GroupDemoDeviceServiceImpl implements GroupDemoDeviceService {

	@Override
	public int insertModel(GroupDemoDeviceModel groupDemoDevice) {
		return GroupDemoDeviceDao.getInstance().insert(groupDemoDevice);
	}

	@Override
	public GroupDemoDeviceModel findByGroupIdAndTermianl(String terminal,int groupId) {
		return GroupDemoDeviceDao.getInstance().findByGroupIdAndTermianl(terminal, groupId);
	}

	@Override
	public boolean updateGroupDemoDevice(GroupDemoDeviceModel groupDemoDevice) {
		return GroupDemoDeviceDao.getInstance().update(groupDemoDevice);
	}

	@Override
	public List<GroupDemoDeviceModel> findBySortTime(int sortTime, int groupId) {
		return GroupDemoDeviceDao.getInstance().findBySortTime(sortTime, groupId);
	}

	@Override
	public List<GroupDemoDeviceModel> findByAllDevice(int groupId) {
		return GroupDemoDeviceDao.getInstance().findByAllDevice(groupId);
	}

}
